package com.rem.cloudalibaba.controller;

import com.rem.cloudalibaba.service.sentinel.SentinelResourcesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 注解@SentinelResource的使用
 *
 * @author Rem
 * @date 2021-08-04
 */

@RestController
public class SentinelResourcesController {


    @Autowired
    SentinelResourcesService sentinelResourcesService;


    @GetMapping(value = "/sentinel/resources1")
    public String resources1() {
        return sentinelResourcesService.message();
    }

    @GetMapping(value = "/sentinel/resources2")
    public String resources2() {
        return sentinelResourcesService.message2();
    }
}
